import { userInfo } from '@/model/index';

export const allDirective = (app) => {

  app.directive('has', {
    mounted(el, bind, context) {
      if (!userInfo.vm.data.buttons?.includes(bind.value)) {
        el.parentNode.removeChild(el)
      }
    }
  })
}